﻿<%template _header%>
<%namespace YouHP.Model%>
<%namespace YouHP.Model.Group%>
<%namespace YouHP.Utility%>

<script type="text/javascript">
		var curtab = "treatment";
		function swapTab(tab,type)
		{
             var ctrl = _$("ui-" + curtab);
			 ctrl.style.display = 'none';
			 ctrl = _$("ui-" + tab);
			 ctrl.style.display = 'block';
			 curtab = tab;
			 _$("searchtype").value = type ;
		}
		
        function checkform()
        { 
            var str ="";           
            switch(parseInt(_$("searchtype").value))
            {
                case 1:
                    str="trmname="+_$("trmname").value.escUrl();
                    break ;
                case 2:
                    str="dszid="+_$("dszid").options[_$("dszid").selectedIndex].value;
                    break ;                    
            }
            location.href = "/Pages/Alpha/TreatmentList.aspx?"+str;
        }
 </script>

<div class="layout-cols2">
	
	<div class="col1">
	
 <%csharp%>TempUrl = ModuleCtrl.Header4("TreatmentList","搜索治疗",false,false); <%/csharp%>
{TempUrl}
<div  style="padding:5px 10px;">
                <div id="search-links" class="searchbox">
                    <img src="/support/Alpha/images/icon_search_results.gif" />
                    <label>搜索条件：</label>
                    <a href="#" id="A3" name="trmSymbol" onclick="swapTab('trmSymbol',0);">按治疗名称首字母</a> |     
                    <a href="#" id="A4" name="treatment" onclick="swapTab('treatment',1);">按治疗名</a> |     
                    <a href="#" id="A5" name="disease" onclick="swapTab('disease',2);">按疾病名</a> 
                </div>
                 <input type="hidden" id="searchtype" value="1" />
                <div id="search-ui" >
                    <%csharp%>TempUrl="/TreatmentList.aspx";<%/csharp%>
                    <form  id="postform" method="get" action="{this.GetUrl(TempUrl)}" >
                    <table>
                        <tr>
                        <td width="10px"></td>
                        <td >
                            <div id="ui-trmSymbol" style="display:none;float:left; padding:2px;">
                                <%csharp%>foreach(string info in mPingYin){<%/csharp%>
                                <%csharp%>TempUrl = "/TreatmentList.aspx?firstLetter=" + info; <%/csharp%>
                                <a  id="A6" href="{this.GetUrl(TempUrl)}" >{info}</a> |
                                <%csharp%> } <%/csharp%>
                            </div>
                            
                            <div id="ui-treatment" style="display: block;float:left; padding:2px;">
                                治疗：
                                <input type="text" id="trmname" name="trmname" length="20">
                                &nbsp;&nbsp; <input id="Button2" type="button" value="搜索" class="button1" onclick="checkform()" />
                            </div>
                           
                            <div id="ui-disease" style="display: none;float:left; padding:2px;">
                                疾病:
                                <select id="dszid" name="dszid">
                                    <option value="" selected>不限</option>
                                    <%csharp%>
                                    foreach( DiseaseInfo Info in DiseaseLst) {
                                    <%/csharp%>
                                    <option value="{Info.Id}">{Info.Name}</option>
                                    <%csharp%>
                                    }
                                    <%/csharp%>
                                </select>
                                &nbsp;&nbsp; <input id="Button3" type="button" value="搜索" class="button1" onclick="checkform()" />
                            </div>
                        </td>
                        </tr>
                    </table> 
                    </form>
                </div>
  </div>
<%csharp%>TempUrl = ModuleCtrl.Footer("TreatmentList"); <%/csharp%>
{TempUrl}
 
                		
<%csharp%>TempUrl = ModuleCtrl.Header4("TreatmentList","治疗列表",false,false); <%/csharp%>
{TempUrl}
                
                

				<%csharp%> if(TreatmentDataList.Count == 0){ <%/csharp%>

			    <div class="content">
				<p><b>找不到相应的治疗!!</b></p>
				</div>

				<%csharp%> } else { <%/csharp%>
				
                    <ul class="topicsort">
                    <li onmouseover="this.className='topicsort_on'" onmouseout="this.className=''"><a href="#" ><font color="red">西药</font></a></li>
                    <%csharp%>TempUrl = "/PrescriptionAll.aspx";<%/csharp%>
                    <li onmouseover="this.className='topicsort_on'" onmouseout="this.className=''"><a href="{this.GetUrl(TempUrl)}">中药</a></li>

                    </ul>
				
				
				<table border="0" cellpadding="0" cellspacing="0" class="plist">
	                   <tr style="height:30px;"> 
                            <td width="30%" height="26"><b class="tdtitle">商用名（通用名）</b></td>
                            <td width="60%" align="center"><b class="tdtitle">简介</b></td>
                            <td width="10%" align="center"><b class="tdtitle">当前使用人数</b></td>
                       </tr>
				<%csharp%>
				string str="tr_bgcolor_0";
				foreach(TreatmentInfo item in TreatmentDataList) { <%/csharp%>
					<tbody><tr height="60" class="{str}">
					 <%csharp%>TempUrl = "/Treatment.aspx?id=" + item.Id; <%/csharp%>
						<td><a href="{this.GetUrl(TempUrl)}">{item.Name}（{item.GeneralName}）</a></td>
						<%csharp%>
						string sb=item.Intro;
						if(sb.Length==0){sb="暂无说明";} 
						if(sb.Length>50){
						sb=sb.Substring(0,Math.Min(50,sb.Length))+"……";}
						<%/csharp%>
						<td style="padding:0px 10px 0px 10px;"><span style="text-overflow:ellipsis;">{sb}</span></td>
						
						<%csharp%> 
						    TempUrl="/PatientList.aspx?trmid="+item.Id ;
						    if(item.PatientCount > 0)
						    {
						<%/csharp%>						
						<td align="center"><a href="{this.GetUrl(TempUrl)}"><font color="blue">{item.PatientCount}</a></font></td> 
						<%csharp%> 
                            }
                            else{
						<%/csharp%>	
                        <td align="center">{item.PatientCount}</td> 
						<%csharp%> 
                            }
    					<%/csharp%>	
						
					</tr></tbody>
					<%csharp%>
					if(str=="tr_bgcolor_0") str="tr_bgcolor_1";
					else str="tr_bgcolor_0";
					}<%/csharp%>
				</table>				
				<%csharp%> } <%/csharp%>
				
				
				
<%csharp%>TempUrl = ModuleCtrl.Footer("TreatmentList"); <%/csharp%>
{TempUrl}	
		
		<div class="box">
			<div class="content">
				<div class="pages">
					{TreatmentPagingString}
				</div>
			</div>
		</div>
		
	</div>
	
	<div class="col2">
	    <%template _BestFitPatientsByTreatments%>
	    <%template _MostFrequentUsedTreatmentsOfDisease%>
        <%template _TopicHottest%>
	</div>
		
</div>

<%template _footer%>		